package com.clean.scanlibrary.bean

import android.os.Parcel
import android.os.Parcelable

data class CurrencyInfoBean(val currencyName:String,
                       val hasdetail:Int,
                       val currencyCode:String,
                       val year:String,
                       val currencyDenomination:String,
                       val log_id:String,
                       val image_processed:String,
                       var image:String,):Parcelable{
    constructor(parcel: Parcel) : this(
        parcel.readString().toString(),
        parcel.readInt(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(currencyName)
        parcel.writeInt(hasdetail)
        parcel.writeString(currencyCode)
        parcel.writeString(year)
        parcel.writeString(currencyDenomination)
        parcel.writeString(log_id)
        parcel.writeString(image)
        parcel.writeString(image_processed)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<CurrencyInfoBean> {
        override fun createFromParcel(parcel: Parcel): CurrencyInfoBean {
            return CurrencyInfoBean(parcel)
        }

        override fun newArray(size: Int): Array<CurrencyInfoBean?> {
            return arrayOfNulls(size)
        }
    }


}